package zzps.exeed.plugin.undertow;

import zzps.exeed.kernel.event.AppLoadEndAppEvent;
import zzps.exeed.kernel.event.EventListener;

public class UndertowStartEventListener implements EventListener<AppLoadEndAppEvent> {
    UndertowWebServer webServer;

    public UndertowStartEventListener(UndertowWebServer webServer) {
        this.webServer = webServer;
    }

    @Override
    public Class<AppLoadEndAppEvent> eventType() {
        return AppLoadEndAppEvent.class;
    }

    @Override
    public void onEvent(AppLoadEndAppEvent appLoadEndAppEvent) {
        webServer.start();
    }
}
